home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / short7.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  15.5 KB  |  552 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "short.h"
  9. T0* r701item(T701* C,int a1){
  10. T0* R=NULL;
  11. R=((((T701*)C))->_storage/*0*/)[(a1)-((((T701*)C))->_lower/*12*/)];
  12. return R;
  13. }
  14. /*No:ARRAY[TYPE].storage*/
  15. T0* r701twin(T701* C){
  16. T0* R=NULL;
  17. R=malloc(sizeof(*C));
  18. *((T701*)R)=M701;
  19. r701copy(((T701*)R),((T0*)C));
  20. return R;
  21. }
  22. /*No:ARRAY[TYPE].capacity*/
  23. void r701copy(T701* C,T0* a1){
  24. int _needed_capacity=0;
  25. C->_lower=(((T701*)((T701*)a1)))->_lower/*12*/;
  26. C->_upper=(((T701*)((T701*)a1)))->_upper/*8*/;
  27. _needed_capacity=(((((T701*)C))->_upper/*8*/)-((((T701*)C))->_lower/*12*/))+(1);
  28. /*IF*/if (((((T701*)C))->_capacity/*4*/)<(_needed_capacity)) {
  29. C->_capacity=_needed_capacity;
  30. C->_storage=calloc((((T701*)C))->_capacity/*4*/,sizeof(T0*));
  31. }
  32. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  33. r770copy_from((((T701*)C))->_storage/*0*/,(((T701*)((T701*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
  34. }
  35. /*FI*/}
  36. /*No:ARRAY[TYPE].lower*/
  37. void r701with_capacity(T701* C,int a1,int a2){
  38. /*IF*/if (((((T701*)C))->_capacity/*4*/)<(a1)) {
  39. C->_storage=calloc(a1,sizeof(T0*));
  40. C->_capacity=a1;
  41. }
  42. /*FI*/C->_lower=a2;
  43. C->_upper=(a2)-(1);
  44. }
  45. /*No:ARRAY[TYPE].put*/
  46. /*No:ARRAY[TYPE].upper*/
  47. int r701count(T701* C){
  48. int R=0;
  49. R=(((((T701*)C))->_upper/*8*/)-((((T701*)C))->_lower/*12*/))+(1);
  50. return R;
  51. }
  52. void r701add_last(T701* C,T0* a1){
  53. int _new_capacity=0;
  54. /*IF*/if (((((T701*)C))->_capacity/*4*/)<((r701count(C))+(1))) {
  55. /*IF*/if (((((T701*)C))->_capacity/*4*/)==(0)) {
  56. C->_capacity=16;
  57. C->_storage=calloc((((T701*)C))->_capacity/*4*/,sizeof(T0*));
  58. }
  59. else {
  60. _new_capacity=(2)*((((T701*)C))->_capacity/*4*/);
  61. C->_storage=r770realloc((((T701*)C))->_storage/*0*/,(((T701*)C))->_capacity/*4*/,_new_capacity);
  62. C->_capacity=_new_capacity;
  63. }
  64. /*FI*/}
  65. /*FI*/C->_upper=((((T701*)C))->_upper/*8*/)+(1);
  66. /*[IRF3.6put*/{T701* C1=C;
  67. T0* b1=a1;
  68. int b2=(((T701*)C))->_upper/*8*/;
  69. ((((T701*)C1))->_storage/*0*/)[(b2)-((((T701*)C1))->_lower/*12*/)]=(b1);
  70. }/*]*/
  71. }
  72. T0* r701first(T701* C){
  73. T0* R=NULL;
  74. R=r701item(C,(((T701*)C))->_lower/*12*/);
  75. return R;
  76. }
  77. /*No:ARRAY[E_REQUIRE].clear_all*/
  78. /*No:ARRAY[E_REQUIRE].set_all_with*/
  79. int r522empty(T522* C){
  80. int R=0;
  81. R=(r522count(C))==(0);
  82. return R;
  83. }
  84. void r522make(T522* C,int a1,int a2){
  85. int _needed=0;
  86. C->_lower=a1;
  87. C->_upper=a2;
  88. _needed=((a2)-(a1))+(1);
  89. /*IF*/if ((_needed)>(0)) {
  90. /*IF*/if (((((T522*)C))->_capacity/*4*/)<(_needed)) {
  91. /*IF*/if (((((T522*)C))->_capacity/*4*/)==(0)) {
  92. C->_storage=calloc(_needed,sizeof(T0*));
  93. }
  94. else {
  95. C->_storage=calloc(_needed,sizeof(T0*));
  96. }
  97. /*FI*/C->_capacity=_needed;
  98. }
  99. else {
  100. /*[IRF3.6clear_all*/{T522* C1=C;
  101. T0* __value=NULL;
  102. /*[IRF3.6set_all_with*/{T522* C2=C1;
  103. T0* c1=__value;
  104. r884set_all_with((((T522*)C2))->_storage/*0*/,c1,((((T522*)C2))->_upper/*8*/)-((((T522*)C2))->_lower/*12*/));
  105. }/*]*/
  106. }/*]*/
  107. }
  108. /*FI*/}
  109. /*FI*/}
  110. int r522fast_has(T522* C,T0* a1){
  111. int R=0;
  112. /*IF*/if ((r522count(C))>(0)) {
  113. R=(r522fast_index_of(C,a1))<=((((T522*)C))->_upper/*8*/);
  114. }
  115. /*FI*/return R;
  116. }
  117. T0* r522item(T522* C,int a1){
  118. T0* R=NULL;
  119. R=((((T522*)C))->_storage/*0*/)[(a1)-((((T522*)C))->_lower/*12*/)];
  120. return R;
  121. }
  122. void r522clear(T522* C){
  123. C->_upper=((((T522*)C))->_lower/*12*/)-(1);
  124. }
  125. /*No:ARRAY[E_REQUIRE].storage*/
  126. /*No:ARRAY[E_REQUIRE].capacity*/
  127. /*No:ARRAY[E_REQUIRE].lower*/
  128. int r522fast_index_of(T522* C,T0* a1){
  129. int R=0;
  130. R=((((T522*)C))->_lower/*12*/)+(r884fast_index_of((((T522*)C))->_storage/*0*/,a1,((((T522*)C))->_upper/*8*/)-((((T522*)C))->_lower/*12*/)));
  131. return R;
  132. }
  133. /*No:ARRAY[E_REQUIRE].put*/
  134. /*No:ARRAY[E_REQUIRE].upper*/
  135. void r522add_last(T522* C,T0* a1){
  136. int _new_capacity=0;
  137. /*IF*/if (((((T522*)C))->_capacity/*4*/)<((r522count(C))+(1))) {
  138. /*IF*/if (((((T522*)C))->_capacity/*4*/)==(0)) {
  139. C->_capacity=16;
  140. C->_storage=calloc((((T522*)C))->_capacity/*4*/,sizeof(T0*));
  141. }
  142. else {
  143. _new_capacity=(2)*((((T522*)C))->_capacity/*4*/);
  144. C->_storage=r884realloc((((T522*)C))->_storage/*0*/,(((T522*)C))->_capacity/*4*/,_new_capacity);
  145. C->_capacity=_new_capacity;
  146. }
  147. /*FI*/}
  148. /*FI*/C->_upper=((((T522*)C))->_upper/*8*/)+(1);
  149. /*[IRF3.6put*/{T522* C1=C;
  150. T0* b1=a1;
  151. int b2=(((T522*)C))->_upper/*8*/;
  152. ((((T522*)C1))->_storage/*0*/)[(b2)-((((T522*)C1))->_lower/*12*/)]=(b1);
  153. }/*]*/
  154. }
  155. int r522count(T522* C){
  156. int R=0;
  157. R=(((((T522*)C))->_upper/*8*/)-((((T522*)C))->_lower/*12*/))+(1);
  158. return R;
  159. }
  160. T0* r552item(T552* C,int a1){
  161. T0* R=NULL;
  162. R=((((T552*)C))->_storage/*0*/)[(a1)-((((T552*)C))->_lower/*12*/)];
  163. return R;
  164. }
  165. /*No:ARRAY[RENAME_PAIR].storage*/
  166. /*No:ARRAY[RENAME_PAIR].capacity*/
  167. /*No:ARRAY[RENAME_PAIR].lower*/
  168. /*No:ARRAY[RENAME_PAIR].put*/
  169. /*No:ARRAY[RENAME_PAIR].upper*/
  170. int r552count(T552* C){
  171. int R=0;
  172. R=(((((T552*)C))->_upper/*8*/)-((((T552*)C))->_lower/*12*/))+(1);
  173. return R;
  174. }
  175. void r552add_last(T552* C,T0* a1){
  176. int _new_capacity=0;
  177. /*IF*/if (((((T552*)C))->_capacity/*4*/)<((r552count(C))+(1))) {
  178. /*IF*/if (((((T552*)C))->_capacity/*4*/)==(0)) {
  179. C->_capacity=16;
  180. C->_storage=calloc((((T552*)C))->_capacity/*4*/,sizeof(T0*));
  181. }
  182. else {
  183. _new_capacity=(2)*((((T552*)C))->_capacity/*4*/);
  184. C->_storage=r949realloc((((T552*)C))->_storage/*0*/,(((T552*)C))->_capacity/*4*/,_new_capacity);
  185. C->_capacity=_new_capacity;
  186. }
  187. /*FI*/}
  188. /*FI*/C->_upper=((((T552*)C))->_upper/*8*/)+(1);
  189. /*[IRF3.6put*/{T552* C1=C;
  190. T0* b1=a1;
  191. int b2=(((T552*)C))->_upper/*8*/;
  192. ((((T552*)C1))->_storage/*0*/)[(b2)-((((T552*)C1))->_lower/*12*/)]=(b1);
  193. }/*]*/
  194. }
  195. /*No:FIXED_ARRAY[E_FEATURE].item*/
  196. /*No:FIXED_ARRAY[E_FEATURE].clear*/
  197. /*No:FIXED_ARRAY[E_FEATURE].storage*/
  198. T0* r352twin(T352* C){
  199. T0* R=NULL;
  200. R=malloc(sizeof(*C));
  201. *((T352*)R)=M352;
  202. r352copy(((T352*)R),((T0*)C));
  203. return R;
  204. }
  205. /*No:FIXED_ARRAY[E_FEATURE].capacity*/
  206. void r352copy(T352* C,T0* a1){
  207. int _new_capacity=0;
  208. int _other_upper=0;
  209. _other_upper=(((T352*)((T352*)a1)))->_upper/*8*/;
  210. /*IF*/if ((_other_upper)>=(0)) {
  211. _new_capacity=(_other_upper)+(1);
  212. /*IF*/if (((((T352*)C))->_capacity/*4*/)<(_new_capacity)) {
  213. C->_capacity=_new_capacity;
  214. C->_storage=calloc(_new_capacity,sizeof(T0*));
  215. }
  216.  else if (((((T352*)C))->_capacity/*4*/)>(0)) {
  217. r822clear_all((((T352*)C))->_storage/*0*/,((((T352*)C))->_capacity/*4*/)-(1));
  218. }
  219. /*FI*/r822copy_from((((T352*)C))->_storage/*0*/,(((T352*)((T352*)a1)))->_storage/*0*/,_other_upper);
  220. }
  221.  else if (((((T352*)C))->_capacity/*4*/)>(0)) {
  222. r822clear_all((((T352*)C))->_storage/*0*/,((((T352*)C))->_capacity/*4*/)-(1));
  223. }
  224. /*FI*/C->_upper=_other_upper;
  225. }
  226. void r352with_capacity(T352* C,int a1){
  227. /*IF*/if (((((T352*)C))->_capacity/*4*/)<(a1)) {
  228. C->_storage=calloc(a1,sizeof(T0*));
  229. C->_capacity=a1;
  230. }
  231. /*FI*/C->_upper=-(1);
  232. }
  233. /*No:FIXED_ARRAY[E_FEATURE].put*/
  234. /*No:FIXED_ARRAY[E_FEATURE].upper*/
  235. void r352add_last(T352* C,T0* a1){
  236. int _new_capacity=0;
  237. /*IF*/if ((((((T352*)C))->_upper/*8*/)+(1))<=(((((T352*)C))->_capacity/*4*/)-(1))) {
  238. C->_upper=((((T352*)C))->_upper/*8*/)+(1);
  239. }
  240.  else if (((((T352*)C))->_capacity/*4*/)==(0)) {
  241. C->_storage=calloc(2,sizeof(T0*));
  242. C->_capacity=2;
  243. C->_upper=0;
  244. }
  245. else {
  246. _new_capacity=(2)*((((T352*)C))->_capacity/*4*/);
  247. C->_storage=r822realloc((((T352*)C))->_storage/*0*/,(((T352*)C))->_capacity/*4*/,_new_capacity);
  248. C->_capacity=_new_capacity;
  249. C->_upper=((((T352*)C))->_upper/*8*/)+(1);
  250. }
  251. /*FI*//*[IRF3.5put*/((((T352*)C))->_storage/*0*/)[(((T352*)C))->_upper/*8*/]=(a1);
  252. /*]*/
  253. }
  254. /*No:ARRAY[INDEX_CLAUSE].storage*/
  255. /*No:ARRAY[INDEX_CLAUSE].capacity*/
  256. /*No:ARRAY[INDEX_CLAUSE].lower*/
  257. /*No:ARRAY[INDEX_CLAUSE].put*/
  258. /*No:ARRAY[INDEX_CLAUSE].upper*/
  259. int r848count(T848* C){
  260. int R=0;
  261. R=(((((T848*)C))->_upper/*8*/)-((((T848*)C))->_lower/*12*/))+(1);
  262. return R;
  263. }
  264. void r848add_last(T848* C,T0* a1){
  265. int _new_capacity=0;
  266. /*IF*/if (((((T848*)C))->_capacity/*4*/)<((r848count(C))+(1))) {
  267. /*IF*/if (((((T848*)C))->_capacity/*4*/)==(0)) {
  268. C->_capacity=16;
  269. C->_storage=calloc((((T848*)C))->_capacity/*4*/,sizeof(T0*));
  270. }
  271. else {
  272. _new_capacity=(2)*((((T848*)C))->_capacity/*4*/);
  273. C->_storage=r100realloc((((T848*)C))->_storage/*0*/,(((T848*)C))->_capacity/*4*/,_new_capacity);
  274. C->_capacity=_new_capacity;
  275. }
  276. /*FI*/}
  277. /*FI*/C->_upper=((((T848*)C))->_upper/*8*/)+(1);
  278. /*[IRF3.6put*/{T848* C1=C;
  279. T0* b1=a1;
  280. int b2=(((T848*)C))->_upper/*8*/;
  281. ((((T848*)C1))->_storage/*0*/)[(b2)-((((T848*)C1))->_lower/*12*/)]=(b1);
  282. }/*]*/
  283. }
  284. T0* r51item(T51* C,int a1){
  285. T0* R=NULL;
  286. R=((((T51*)C))->_storage/*0*/)[(a1)-((((T51*)C))->_lower/*12*/)];
  287. return R;
  288. }
  289. void r51clear(T51* C){
  290. C->_upper=((((T51*)C))->_lower/*12*/)-(1);
  291. }
  292. /*No:ARRAY[POSITION].storage*/
  293. /*No:ARRAY[POSITION].capacity*/
  294. int r51has(T51* C,T0* a1){
  295. int R=0;
  296. /*IF*/if ((r51count(C))>(0)) {
  297. R=(r51index_of(C,a1))<=((((T51*)C))->_upper/*8*/);
  298. }
  299. /*FI*/return R;
  300. }
  301. /*No:ARRAY[POSITION].lower*/
  302. void r51with_capacity(T51* C,int a1,int a2){
  303. /*IF*/if (((((T51*)C))->_capacity/*4*/)<(a1)) {
  304. C->_storage=calloc(a1,sizeof(T0*));
  305. C->_capacity=a1;
  306. }
  307. /*FI*/C->_lower=a2;
  308. C->_upper=(a2)-(1);
  309. }
  310. /*No:ARRAY[POSITION].put*/
  311. /*No:ARRAY[POSITION].upper*/
  312. void r51add_last(T51* C,T0* a1){
  313. int _new_capacity=0;
  314. /*IF*/if (((((T51*)C))->_capacity/*4*/)<((r51count(C))+(1))) {
  315. /*IF*/if (((((T51*)C))->_capacity/*4*/)==(0)) {
  316. C->_capacity=16;
  317. C->_storage=calloc((((T51*)C))->_capacity/*4*/,sizeof(T0*));
  318. }
  319. else {
  320. _new_capacity=(2)*((((T51*)C))->_capacity/*4*/);
  321. C->_storage=r379realloc((((T51*)C))->_storage/*0*/,(((T51*)C))->_capacity/*4*/,_new_capacity);
  322. C->_capacity=_new_capacity;
  323. }
  324. /*FI*/}
  325. /*FI*/C->_upper=((((T51*)C))->_upper/*8*/)+(1);
  326. /*[IRF3.6put*/{T51* C1=C;
  327. T0* b1=a1;
  328. int b2=(((T51*)C))->_upper/*8*/;
  329. ((((T51*)C1))->_storage/*0*/)[(b2)-((((T51*)C1))->_lower/*12*/)]=(b1);
  330. }/*]*/
  331. }
  332. int r51count(T51* C){
  333. int R=0;
  334. R=(((((T51*)C))->_upper/*8*/)-((((T51*)C))->_lower/*12*/))+(1);
  335. return R;
  336. }
  337. int r51index_of(T51* C,T0* a1){
  338. int R=0;
  339. R=((((T51*)C))->_lower/*12*/)+(r379index_of((((T51*)C))->_storage/*0*/,a1,((((T51*)C))->_upper/*8*/)-((((T51*)C))->_lower/*12*/)));
  340. return R;
  341. }
  342. int r854empty(T854* C){
  343. int R=0;
  344. R=(/*(IRF4.6count*/((((T854*)C))->_upper/*8*/)+(1)/*)*/)==(0);
  345. return R;
  346. }
  347. /*No:FIXED_ARRAY[PARENT].item*/
  348. /*No:FIXED_ARRAY[PARENT].clear*/
  349. /*No:FIXED_ARRAY[PARENT].storage*/
  350. /*No:FIXED_ARRAY[PARENT].capacity*/
  351. T0* r854last(T854* C){
  352. T0* R=NULL;
  353. R=/*(IRF4.6item*/((((T854*)C))->_storage/*0*/)[(((T854*)C))->_upper/*8*/]/*)*/;
  354. return R;
  355. }
  356. void r854with_capacity(T854* C,int a1){
  357. /*IF*/if (((((T854*)C))->_capacity/*4*/)<(a1)) {
  358. C->_storage=calloc(a1,sizeof(T0*));
  359. C->_capacity=a1;
  360. }
  361. /*FI*/C->_upper=-(1);
  362. }
  363. /*No:FIXED_ARRAY[PARENT].put*/
  364. /*No:FIXED_ARRAY[PARENT].upper*/
  365. void r854add_last(T854* C,T0* a1){
  366. int _new_capacity=0;
  367. /*IF*/if ((((((T854*)C))->_upper/*8*/)+(1))<=(((((T854*)C))->_capacity/*4*/)-(1))) {
  368. C->_upper=((((T854*)C))->_upper/*8*/)+(1);
  369. }
  370.  else if (((((T854*)C))->_capacity/*4*/)==(0)) {
  371. C->_storage=calloc(2,sizeof(T0*));
  372. C->_capacity=2;
  373. C->_upper=0;
  374. }
  375. else {
  376. _new_capacity=(2)*((((T854*)C))->_capacity/*4*/);
  377. C->_storage=r304realloc((((T854*)C))->_storage/*0*/,(((T854*)C))->_capacity/*4*/,_new_capacity);
  378. C->_capacity=_new_capacity;
  379. C->_upper=((((T854*)C))->_upper/*8*/)+(1);
  380. }
  381. /*FI*//*[IRF3.5put*/((((T854*)C))->_storage/*0*/)[(((T854*)C))->_upper/*8*/]=(a1);
  382. /*]*/
  383. }
  384. /*No:FIXED_ARRAY[PARENT].count*/
  385. void r854remove_last(T854* C){
  386. C->_upper=((((T854*)C))->_upper/*8*/)-(1);
  387. }
  388. T0* r26item(T26* C,int a1){
  389. T0* R=NULL;
  390. R=((((T26*)C))->_storage/*0*/)[(a1)-((((T26*)C))->_lower/*12*/)];
  391. return R;
  392. }
  393. /*No:ARRAY[PARENT].storage*/
  394. /*No:ARRAY[PARENT].capacity*/
  395. /*No:ARRAY[PARENT].lower*/
  396. /*No:ARRAY[PARENT].put*/
  397. /*No:ARRAY[PARENT].upper*/
  398. int r26count(T26* C){
  399. int R=0;
  400. R=(((((T26*)C))->_upper/*8*/)-((((T26*)C))->_lower/*12*/))+(1);
  401. return R;
  402. }
  403. void r26add_last(T26* C,T0* a1){
  404. int _new_capacity=0;
  405. /*IF*/if (((((T26*)C))->_capacity/*4*/)<((r26count(C))+(1))) {
  406. /*IF*/if (((((T26*)C))->_capacity/*4*/)==(0)) {
  407. C->_capacity=16;
  408. C->_storage=calloc((((T26*)C))->_capacity/*4*/,sizeof(T0*));
  409. }
  410. else {
  411. _new_capacity=(2)*((((T26*)C))->_capacity/*4*/);
  412. C->_storage=r304realloc((((T26*)C))->_storage/*0*/,(((T26*)C))->_capacity/*4*/,_new_capacity);
  413. C->_capacity=_new_capacity;
  414. }
  415. /*FI*/}
  416. /*FI*/C->_upper=((((T26*)C))->_upper/*8*/)+(1);
  417. /*[IRF3.6put*/{T26* C1=C;
  418. T0* b1=a1;
  419. int b2=(((T26*)C))->_upper/*8*/;
  420. ((((T26*)C1))->_storage/*0*/)[(b2)-((((T26*)C1))->_lower/*12*/)]=(b1);
  421. }/*]*/
  422. }
  423. T0* r26first(T26* C){
  424. T0* R=NULL;
  425. R=r26item(C,(((T26*)C))->_lower/*12*/);
  426. return R;
  427. }
  428. T0* r587item(T587* C,int a1){
  429. T0* R=NULL;
  430. R=((((T587*)C))->_storage/*0*/)[(a1)-((((T587*)C))->_lower/*12*/)];
  431. return R;
  432. }
  433. /*No:ARRAY[EXPORT_ITEM].storage*/
  434. /*No:ARRAY[EXPORT_ITEM].capacity*/
  435. /*No:ARRAY[EXPORT_ITEM].lower*/
  436. /*No:ARRAY[EXPORT_ITEM].put*/
  437. /*No:ARRAY[EXPORT_ITEM].upper*/
  438. int r587count(T587* C){
  439. int R=0;
  440. R=(((((T587*)C))->_upper/*8*/)-((((T587*)C))->_lower/*12*/))+(1);
  441. return R;
  442. }
  443. void r587add_last(T587* C,T0* a1){
  444. int _new_capacity=0;
  445. /*IF*/if (((((T587*)C))->_capacity/*4*/)<((r587count(C))+(1))) {
  446. /*IF*/if (((((T587*)C))->_capacity/*4*/)==(0)) {
  447. C->_capacity=16;
  448. C->_storage=calloc((((T587*)C))->_capacity/*4*/,sizeof(T0*));
  449. }
  450. else {
  451. _new_capacity=(2)*((((T587*)C))->_capacity/*4*/);
  452. C->_storage=r44realloc((((T587*)C))->_storage/*0*/,(((T587*)C))->_capacity/*4*/,_new_capacity);
  453. C->_capacity=_new_capacity;
  454. }
  455. /*FI*/}
  456. /*FI*/C->_upper=((((T587*)C))->_upper/*8*/)+(1);
  457. /*[IRF3.6put*/{T587* C1=C;
  458. T0* b1=a1;
  459. int b2=(((T587*)C))->_upper/*8*/;
  460. ((((T587*)C1))->_storage/*0*/)[(b2)-((((T587*)C1))->_lower/*12*/)]=(b1);
  461. }/*]*/
  462. }
  463. /*No:ARRAY[MANIFEST_STRING].clear_all*/
  464. /*No:ARRAY[MANIFEST_STRING].set_all_with*/
  465. void r381make(T381* C,int a1,int a2){
  466. int _needed=0;
  467. C->_lower=a1;
  468. C->_upper=a2;
  469. _needed=((a2)-(a1))+(1);
  470. /*IF*/if ((_needed)>(0)) {
  471. /*IF*/if (((((T381*)C))->_capacity/*8*/)<(_needed)) {
  472. /*IF*/if (((((T381*)C))->_capacity/*8*/)==(0)) {
  473. C->_storage=calloc(_needed,sizeof(T0*));
  474. }
  475. else {
  476. C->_storage=calloc(_needed,sizeof(T0*));
  477. }
  478. /*FI*/C->_capacity=_needed;
  479. }
  480. else {
  481. /*[IRF3.6clear_all*/{T381* C1=C;
  482. T0* __value=NULL;
  483. /*[IRF3.6set_all_with*/{T381* C2=C1;
  484. T0* c1=__value;
  485. r729set_all_with((((T381*)C2))->_storage/*4*/,c1,((((T381*)C2))->_upper/*12*/)-((((T381*)C2))->_lower/*16*/));
  486. }/*]*/
  487. }/*]*/
  488. }
  489. /*FI*/}
  490. /*FI*/}
  491. T0* r381item(T381* C,int a1){
  492. T0* R=NULL;
  493. R=((((T381*)C))->_storage/*4*/)[(a1)-((((T381*)C))->_lower/*16*/)];
  494. return R;
  495. }
  496. /*No:ARRAY[MANIFEST_STRING].storage*/
  497. T0* r381twin(T381* C){
  498. T0* R=NULL;
  499. R=malloc(sizeof(*C));
  500. *((T381*)R)=M381;
  501. r381copy(((T381*)R),((T0*)C));
  502. return R;
  503. }
  504. /*No:ARRAY[MANIFEST_STRING].capacity*/
  505. void r381copy(T381* C,T0* a1){
  506. int _needed_capacity=0;
  507. C->_lower=(((T381*)((T381*)a1)))->_lower/*16*/;
  508. C->_upper=(((T381*)((T381*)a1)))->_upper/*12*/;
  509. _needed_capacity=(((((T381*)C))->_upper/*12*/)-((((T381*)C))->_lower/*16*/))+(1);
  510. /*IF*/if (((((T381*)C))->_capacity/*8*/)<(_needed_capacity)) {
  511. C->_capacity=_needed_capacity;
  512. C->_storage=calloc((((T381*)C))->_capacity/*8*/,sizeof(T0*));
  513. }
  514. /*FI*//*IF*/if ((_needed_capacity)>(0)) {
  515. r729copy_from((((T381*)C))->_storage/*4*/,(((T381*)((T381*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
  516. }
  517. /*FI*/}
  518. /*No:ARRAY[MANIFEST_STRING].lower*/
  519. /*No:ARRAY[MANIFEST_STRING].put*/
  520. /*No:ARRAY[MANIFEST_STRING].upper*/
  521. int r381count(T381* C){
  522. int R=0;
  523. R=(((((T381*)C))->_upper/*12*/)-((((T381*)C))->_lower/*16*/))+(1);
  524. return R;
  525. }
  526. void r381add_last(T381* C,T0* a1){
  527. int _new_capacity=0;
  528. /*IF*/if (((((T381*)C))->_capacity/*8*/)<((r381count(C))+(1))) {
  529. /*IF*/if (((((T381*)C))->_capacity/*8*/)==(0)) {
  530. C->_capacity=16;
  531. C->_storage=calloc((((T381*)C))->_capacity/*8*/,sizeof(T0*));
  532. }
  533. else {
  534. _new_capacity=(2)*((((T381*)C))->_capacity/*8*/);
  535. C->_storage=r729realloc((((T381*)C))->_storage/*4*/,(((T381*)C))->_capacity/*8*/,_new_capacity);
  536. C->_capacity=_new_capacity;
  537. }
  538. /*FI*/}
  539. /*FI*/C->_upper=((((T381*)C))->_upper/*12*/)+(1);
  540. /*[IRF3.6put*/{T381* C1=C;
  541. T0* b1=a1;
  542. int b2=(((T381*)C))->_upper/*12*/;
  543. ((((T381*)C1))->_storage/*4*/)[(b2)-((((T381*)C1))->_lower/*16*/)]=(b1);
  544. }/*]*/
  545. }
  546. T0* r381first(T381* C){
  547. T0* R=NULL;
  548. R=r381item(C,(((T381*)C))->_lower/*16*/);
  549. return R;
  550. }
  551.  
  552.